package main

import {
	"fmt"
	"os"
}

func calculate(a, b int) (int, int) {
	sum := a + b
	diff := a - b
	return sum, diff
}

func main() {
	fmt.Println(os.Args)
	fmt.Println("holle, golang")


	i := 0
	for i < 5 {
		fmt.Println(i)
		i++
	}
	nums := []int{1, 2, 3, 4, 5}
	for index, value := range nums {
		fmt.Printf("索引为 %d，对应的值为 %d\n", index, value)
	}

	str := "Hello"
	for index, char := range str {
		fmt.Printf("索引为 %d，对应字符为 %c\n", index, char)
	}

	map1 := map[string]int{"one": 1, "two": 2, "three": 3}
	for key, value := range map1 {
		fmt.Printf("键为 %s，对应的值为 %d\n", key, value)
	}

	sum, diff := calculate(10, 5)
	fmt.Printf("和为: %d，差为: %d\n", sum, diff)

}
